<template>
  <div>
    <textarea v-model="text" @keydown.enter="addNewLine"></textarea> <button @click="xx"></button>
  </div>
</template>

<script lang="ts" setup>
	
import {ref,reactive} from 'vue'

const text = ref('');
const xx = () =>{
	console.log(text.value)
}
const addNewLine = () => {
      this.text += "\n";
	  }
 
</script>
<style>
	
</style>
